-
Notifications
You must be signed in to change notification settings - Fork 1.3k
mentor/dcd_musb - Fix issue reading and writing to USBFIFOn register #3017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
For a single packet read and write operations must pick either 32-bit, 16-bit or 8-bit read or write operations. Mixing and matching can cause corruption of data. This becomes a bigger issue when using TinyUSB fifo that has to deal with wrapping since read/write operations may be split between multiple transfers of different sizes. Therefore, create a function that will determine which operation can be used for transfer the entire buffer of data. Then read and write operations can use a parameter to determine what should be used. Signed-off-by: Franklin Cooper Jr <[email protected]>
Thank you for the fix, but the logic can be better. For example non-fifo based 11 bytes transfer can be
|
Signed-off-by: Mengsk <[email protected]>
@fcooperti, please test my last commit. After checking kernel source code, the access width change is not limited to the latest operation, for example 32b+16b+8b is allowed for 7 bytes I/O (not limited to 3*16b+8b). I've updated the logic to make access width limit only applied to wrapped fifo part while keeping normal transfer and linear fifo part untouched. |
@fcooperti Hello, are you still on this ? |
@hathach Author is unresponsive, do you have board to test it ? |
Sorry for the delay in responding. I was on leave for several months and this is tied to my work email that I wasn’t checking. But I can follow up on this once I sync up with the engineer who picked up my work before I left.
From: Zixun LI ***@***.***>
Sent: Thursday, October 2, 2025 2:01 PM
To: hathach/tinyusb ***@***.***>
Cc: Cooper Jr., Franklin ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [hathach/tinyusb] mentor/dcd_musb - Fix issue reading and writing to USBFIFOn register (PR #3017)
HiFiPhile left a comment (hathach/tinyusb#3017) @hathach Author is unresponsive, do you have board to test it ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned. Message
ZjQcmQRYFpfptBannerStart
This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
Report Suspicious <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK!uvdhFz8EfEdwKe7vFxqrdLi_4YlVVk6R6rm4avUOJdiP8fG7GwFcdnRo_AOly1zZEe1uFJt6kArjjlJiSMIpSy2RAOJdv78$>
ZjQcmQRYFpfptBannerEnd
[https://avatars.githubusercontent.com/u/4375114?s=20&v=4]HiFiPhile left a comment (hathach/tinyusb#3017)<https://urldefense.com/v3/__https:/github.com/hathach/tinyusb/pull/3017*issuecomment-3362565407__;Iw!!G3vK!WlLPq63ybRGkxxXkucaMJe71VEw1lXub5YWHHJBG67SLpXzbJMMpNPrbmPKxkwCoMhojdOVt908Zu-jh7SvX$>
@hathach<https://urldefense.com/v3/__https:/github.com/hathach__;!!G3vK!WlLPq63ybRGkxxXkucaMJe71VEw1lXub5YWHHJBG67SLpXzbJMMpNPrbmPKxkwCoMhojdOVt908Zu3pC9Fi8$> Author is unresponsive, do you have board to test it ?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/hathach/tinyusb/pull/3017*issuecomment-3362565407__;Iw!!G3vK!WlLPq63ybRGkxxXkucaMJe71VEw1lXub5YWHHJBG67SLpXzbJMMpNPrbmPKxkwCoMhojdOVt908Zu-jh7SvX$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BBIXCQMJM6TSZ3DEUWR2YT33VVY6FAVCNFSM6AAAAABYS66QFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRSGU3DKNBQG4__;!!G3vK!WlLPq63ybRGkxxXkucaMJe71VEw1lXub5YWHHJBG67SLpXzbJMMpNPrbmPKxkwCoMhojdOVt908Zu3pOXMvq$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
I don't have the msp432e but do have tm4c123 which I think pretty the same usbip. I will test again later when having time. |
Sorry for the delay. I have been onleave from work and this account is tied to my work email which I haven't been checking while I am out. I'm catching up with the engineer who was working on USB while I was out. Give me a little bit to get back up to speed and I can test this out. |
For a single packet read and write operations must pick either 32-bit, 16-bit or 8-bit read or write operations. Mixing and matching can cause corruption of data.
This becomes a bigger issue when using TinyUSB fifo that has to deal with wrapping since read/write operations may be split between multiple transfers of different sizes.
Therefore, create a function that will determine which operation can be used for transfer the entire buffer of data. Then read and write operations can use a parameter to determine what should be used.
fixes #3010